<fieldset class="solid">
	<legend>创建列</legend>
	<input type="hidden" name="column.id" value="${(column.id)!}" />
	<div>
		<label>隶属项目</label>
		<select name="column.project_id" id="project_id">
		</select>
		${project_idMsg!}
	</div>
	<div>
		<label>隶属表</label>
		<select name="column.table_id" id="table_id">
		</select>
		${table_idMsg!}
	</div>
	<div>
		<label>列名</label>
		<input type="text" name="column.column_name" value="${(column.column_name)!}" />
		${column_nameMsg!}
	</div>
	<div>
		<label>列数据类型</label>
		<input type="text" name="column.column_type" value="${(column.column_type)!}" />
		${column_typeMsg!}
	</div>
	<div>
		<label>是否可以为空</label>
		<input type="text" name="column.is_nullable" value="${(column.is_nullable)!}" />
		${is_nullableMsg!}
	</div>
	<div>
		<label>注释</label>
		<input type="text" name="column.column_comment" value="${(column.column_comment)!}" />
		${column_commentMsg!}
	</div>
	<div>
		<label>排序</label>
		<input type="text" name="column.column_index" value="${(column.column_index)!}" />
		${column_indexMsg!}
	</div>
	<div>
		<label>&nbsp;</label>
		<input value="提交" type="submit">
	</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function(){
	var initSel_project_id = function(callback){
		SelectTool.initSelectData({
			elId:"project_id",
			url:"${BASE_PATH!}/project/listAll",
			valueName:"id",
			textName:"project_name",
			defaultValue:"${(column.project_id)!}",
			callback:callback
		});
	}
	var initSel_table_id = function(callback){
		SelectTool.initSelectData({
			elId:"table_id",
			url:"${BASE_PATH!}/table/listByProjectId",
			postData:{"project_id":$("#project_id").val()},
			valueName:"id",
			textName:"table_name",
			defaultValue:"${(column.table_id)!}",
			callback:callback
		});
	}
	$("#project_id").change(function(){
		initSel_table_id(function(){});
	});
	initSel_project_id(function(){
		initSel_table_id(function(){});
	});
});
</script>